<?php

declare( strict_types = 1 );

namespace App\Common\Model\Base\DataUnit;

use App\Common as com;
use App\Common\Model\Base as nameBase;
use App\Common\Model\Base\DataUnit as nameDataUnit;

class Field extends nameDataUnit\Base {

	/**
	 * @param string $field
	 * @return $this
	 */
	public function addFieldRaw( $field ):self {
		$this->getDataUnit()->addFieldRaw( $field );
		//
		return $this;
	}

	/**
	 * @param string|array $field
	 * @return $this
	 */
	public function addField( $field ):self {
		$this->getDataUnit()->addField( $field );
		//
		return $this;
	}

	/**
	 * @param string|array $field
	 * @param string $as
	 * @return $this
	 */
	public function addFieldAs( $field, string $as = null ):self {
		$this->getDataUnit()->addFieldOneAs( $field, $as );
		//
		return $this;
	}

	/**
	 * @return $this
	 */
	public function addId():self {
		$this->addField( 'id' );
		//
		return $this;
	}

}
